rm(list= ls())

library(tidyverse)
library(lfe)

## Load Election Data

dat <- readRDS('data/fed_elections_kreise.rds') %>%
  filter(type == 'Stadtkreis') %>%
  filter(year == '1965')

summary_all <- unique(dat$county_name_1950) %>%
  as_tibble() %>%
  arrange(value)

# To Tex Table 

tab_tex <- kableExtra::kable(list(summary_all[1:45,], summary_all[46:90,], summary_all[91:136,]), 
                             format = 'latex', 
                             booktabs = T,
                             linesep = "",
                             col.names = NULL,
                             label = 'list_cities',
                             caption = 'City counties in sample',
                             digits = 2) %>%
  kable_styling(latex_options = c("HOLD_position"), 
                position = "center",
                full_width = F,
                font_size = 10) 

tab_tex


